package com.github.ompc.carrying.client.worker;

import java.util.concurrent.ThreadFactory;

public class CarryingDataClientThreadFactory implements ThreadFactory{
	/**
	 * 线程计数器
	 */
	private int consumerThreadCounter;
	
	private String threadName = "carrying-data-client-thread";
	
	@Override
	public Thread newThread(Runnable r) {
		Thread thread = new Thread(r);
		thread.setName(threadName+(consumerThreadCounter++));
		return thread;
	}
	
}
